<?php
namespace Orm\SharingLog;

class SharingLogModel extends \Base\BaseOrmModel{

    function __construct()
    {
        parent::__construct();
        $this->table = 't_sharing_log';
    }

    /**
     * @param $user_id
     * @param $time
     * @return array
     */
    public function getShareByUidAndTime($user_id,$time){
        $sql = "SELECT COUNT(*) as num FROM ".$this->table.' WHERE user_id='.$user_id.' and that_day="'.$time.'"';
        return $this->_fetch($sql,1);
    }
}